package com.bitejiuyeke.biteadminservice.house.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum HouseStatusEnum {
    UP("上架中"),
    DOWN("已下架"),
    RENTING("出租中"),

    ;

    private String desc;

    public static HouseStatusEnum getByName(String name) {
        for (HouseStatusEnum value : HouseStatusEnum.values()) {
            if (value.name().equals(name)) {
                return value;
            }
        }
        return null;
    }
}
